/*
 * multi ir daemon for android -
 * Copyright (C) 2015-2018 AllwinnerTech
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 */

#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>

enum {
    PRINT_ERROR	 = 1U << 0,
    PRINT_WARN	 = 1U << 1,
    PRINT_DEBUG	 = 1U << 2,
};

#define	multiir_debug(fmt, arg...) 				\
do { 											\
	if (print_flags & PRINT_DEBUG)				\
		fprintf(stdout, "[D] " fmt"\n", ##arg);	\
} while(0)

#define	multiir_warning(fmt, arg...) 			\
do { 											\
	if (print_flags & PRINT_WARN)				\
		fprintf(stdout, "[W] " fmt"\n", ##arg);	\
} while(0)

#define	multiir_error(fmt, arg...) 				\
do { 											\
	if (print_flags & PRINT_ERROR)				\
		fprintf(stderr, "[E] " fmt"\n", ##arg);	\
} while(0)

